//
//  SecondTableViewCell.m
//  10-易车作业
//
//  Created by 殷殷明静 on 16/7/27.
//  Copyright © 2016年 YMJ. All rights reserved.
//

#import "SecondTableViewCell.h"

@interface SecondTableViewCell ()
@property (nonatomic, strong) UIImageView *firstImageView;
@property (nonatomic, strong) UIImageView *secondImageView;
@property (nonatomic, strong) UIImageView *thirdImageView;
@end
@implementation SecondTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        _firstImageView = [[UIImageView alloc] init];
        _firstImageView.backgroundColor = [UIColor grayColor];
        [self.contentView addSubview:_firstImageView];
        _secondImageView = [[UIImageView alloc] init];
        _secondImageView.backgroundColor = [UIColor yellowColor];
        [self.contentView addSubview:_secondImageView];
        _thirdImageView = [[UIImageView alloc] init];
        _thirdImageView.backgroundColor = [UIColor blueColor];
        [self.contentView addSubview:_thirdImageView];
    }
    return self;
}
- (void)layoutSubviews {
    [super layoutSubviews];
    _firstImageView.frame = CGRectMake(0, 8, 138, 95);
    _secondImageView.frame = CGRectMake(138, 8, 138, 95);
    _thirdImageView.frame = CGRectMake(276, 8, 138, 95);
}
- (void)setThreeStringModel:(ThreeStringModel *)threeStringModel {
    _threeStringModel = threeStringModel;
    NSArray *arr = [threeStringModel.picCover componentsSeparatedByString:@";"];
    _firstImageView.image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:arr[0]]]];
    _secondImageView.image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:arr[1]]]];
    _thirdImageView.image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:arr[2]]]];
    
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
